
#include "game.h"

volatile int frame = 0;

void Vblank() {
	frame++;
}

int main(void) {
	irqSet(IRQ_VBLANK, Vblank);

	consoleDemoInit();
	//installSoundFIFO(); // needs arm7

//	Game a = Game();


/*
	touchPosition touch;
//	PrintConsole topScreen;
//	consoleInit(&topScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, true, true);
//	PrintConsole bottomScreen;
//	consoleInit(&bottomScreen, 3,BgType_Text4bpp, BgSize_T_256x256, 31, 0, false, true);

	videoSetMode(MODE_0_2D);
	videoSetModeSub(MODE_0_2D);

	vramSetBankA(VRAM_A_MAIN_BG);
	vramSetBankC(VRAM_C_SUB_BG);

*/
/*
	while(1) {

		swiWaitForVBlank();

		int key = keyboardUpdate();

		if(key > 0)
			iprintf("%c", key);
		touchRead(&touch);

		// print at using ansi escape sequence \x1b[line;columnH 
		iprintf("\x1b[10;0HFramexxxxx = %d",frame);
		iprintf("\x1b[16;0HTouch x = %04X, %04X\n", touch.rawx, touch.px);
		iprintf("Touch y = %04X, %04X\n", touch.rawy, touch.py);
		if (touch.py % 2 != 0)
			iprintf("xx");
		else iprintf("  yy");

	}
*/

	return 0;
}
